home *** CD-ROM | disk | FTP | other *** search
/ USGS: Oil & Gas Fields of Asia Pacific / USGS Maps Showing Geology, Oil & Gas Fields of Asia Pacific.iso / pc / ASPAC / VIEWPC03 / SCRIPTS / ZMOUTBUT.AVE < prev    next >
Text File  |  1999-03-10  |  3KB  |  103 lines

  1. ' zmoutbut.ave
  2. ' Integrates Arcview View.ZoomOut system script
  3. ' to label geology on the fly
  4. ' D. W. Steinshouer - GeoLukas for U.S.G.S. GEO CERT WEP
  5. ' World Energy Project
  6. ' Thomas Ahlbrandt   Project Chief
  7.  
  8.  
  9.  
  10. region3 = av.GetProject
  11. region3.SetModified(true)
  12. theView = av.GetActiveDoc
  13. theView.GetDisplay.ZoomOut(125)
  14.  
  15. ' geolabel.ave
  16. ' labels geology at scale > 1:10000000
  17. ' Douglas Steinshouer   11/14/98
  18. ' GeoLukas for USGS GEO CERT World Energy Project
  19.  
  20. ' Defines the theme and clears existing labels
  21.  
  22. theView = av.GetActiveDoc
  23.  
  24. leg = region3.FindDoc("Geologic Legend")
  25. if (theView <> leg) then
  26.  
  27. av.ShowMsg("Labeling geologic age ...")
  28. av.ShowStopButton
  29. av.SetStatus(0)
  30.  
  31. theTheme = theView.GetThemes.Get(5)
  32. theTheme.SetActive(true)
  33. theTheme.GetGraphics.SelectLabels
  34. theTheme.GetGraphics.Invalidate
  35. theView.GetGraphics.ClearSelected
  36.  
  37. ' Determines scale of zoomed view
  38.  
  39. size = theView.GetDisplay.ReturnVisExtent
  40. tall = size.GetHeight
  41. long = size.GetWidth
  42.  
  43. ' Filters scale and draws labels
  44.  
  45.  if ((tall < 889000) AND (long < 1227670)) then
  46.    agelabel = Labeler.Make(size)
  47.    ' agelabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
  48.    ' agelabel.SetLabelWeight(#LABEL_WEIGHT_HIGH)    
  49.    agesymbol = TextSymbol.Make
  50.    agesymbol.SetFont(Font.Make("Univers","Medium"))
  51.     if ((tall < 44450) AND (long < 61383)) then
  52.       agesymbol.SetSize(15)
  53.     elseif ((tall < 88900) AND (long < 122767)) then
  54.       agesymbol.SetSize(12)
  55.     elseif ((tall < 222250) AND (long < 306917)) then
  56.       agesymbol.SetSize(11)
  57.     elseif ((tall < 444500) AND (long < 613835)) then
  58.       agesymbol.SetSize(10)
  59.     elseif ((tall < 666751) AND (long < 920752)) then
  60.       agesymbol.SetSize(9)
  61.     else     
  62.       agesymbol.SetSize(8)
  63.     end
  64.    theTheme.SetLabelTextSym(agesymbol)
  65.    agelabel.Load(theTheme)
  66.    theView.GetAutoLabels(agelabel,true)
  67.  else
  68.    theTheme.GetGraphics.SelectLabels
  69.    theTheme.GetGraphics.Invalidate
  70.    theView.GetGraphics.ClearSelected
  71.  end
  72.  
  73.  t2 = theView.GetThemes.Get(0)
  74. t2.SetActive(true)
  75. t2.GetGraphics.SelectLabels
  76. t2.GetGraphics.Invalidate
  77. theView.GetGraphics.ClearSelected
  78.  
  79. citylabel = Labeler.Make(size)
  80. citylabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
  81. citylabel.SetLabelWeight(#LABEL_WEIGHT_HIGH)    
  82. citysymbol = TextSymbol.Make
  83. citysymbol.SetFont(Font.Make("Univers","Italic"))
  84. citysymbol.SetSize(10)
  85. t2.SetLabelTextSym(citysymbol)
  86. citylabel.Load(t2)
  87. theView.GetAutoLabels(citylabel,true)
  88.  
  89. ts = theView.GetThemes
  90.   for each t in ts
  91.     t.SetActive(false)
  92.   end
  93.  
  94. av.SetStatus(100)
  95. av.ClearMsg
  96.  
  97.  
  98.  end
  99.  
  100.  
  101.  
  102.  
  103.